FROM harbor.dts.com/jdk/openjdk:8
MAINTAINER xinyuan.yao@bjbn.com
ARG JVM_OPTS="-Xms512M -Xmx512M"
ENV TZ Asia/Shanghai
ENV JVM_OPTS=${JVM_OPTS}
ENV API_BASE_URL="https://10.126.129.199:533/restcloud/jeecg-boot" \
    API_TOKEN="71a9913b27434d5785f260c0c25998b8"
WORKDIR /opt/bridata
# docker 容器暴露端口
EXPOSE 33009
ADD ./flight-view-api-0.0.1.jar ./app.jar

#带变量的必须使用“ ‘ ”
RUN echo '#!/bin/bash' > /opt/bridata/run.sh
RUN echo 'echo JVM_OPTS:$JVM_OPTS' >> /opt/bridata/run.sh
RUN echo 'java $JVM_OPTS  -jar app.jar' >> /opt/bridata/run.sh
CMD ["bash", "/opt/bridata/run.sh"]